package tool

import (
	"center-platform/internal/controller/response"
	"center-platform/internal/controller/v1/tool/service"
	"github.com/gin-gonic/gin"
)

func Upload(c *gin.Context) {
	var toolSer service.UploadImpl = new(service.UploadService)
	err, path := toolSer.UploadFile(c)
	if err != nil {
		response.ApiError(c, err.Error())
		return
	}
	response.ApiSuccess(c, path)
}
